package com.thread.synchronizedTest;

/**
 * Test--bdqnPractice
 *
 * @author: Jovi
 * @createTime: 2017-09-05 14:41
 **/
public class Test {

    public static void main(String[] args) throws InterruptedException {
        count();
    }

    private static void method1() throws InterruptedException {
        TheThread tt = new TheThread();
        tt.start();
        int k = 0;
        while (k < 5) {
            Thread.sleep(5000);
            System.out.println("hello");
            k++;
        }
    }

    public static void count() {

        TestAccount ta = new TestAccount();

        Thread zhangsan = new Thread(ta);
        Thread wife = new Thread(ta);

        zhangsan.setName("张三");
        wife.setName("张太太");

        zhangsan.start();
        wife.start();


    }
}
